﻿<UserControl x:Class="MicroFlasher.Views.Settings.ComPortSettingsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:models="clr-namespace:MicroFlasher.Models"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             d:DataContext="{d:DesignInstance models:ComPortSettings }">
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Label Grid.Row="0" Grid.Column="0" Target="{Binding ElementName=ComPort}">Com Port</Label>
        <ComboBox Grid.Row="0" Grid.Column="1" x:Name="ComPort"
                  ItemsSource="{Binding Path=ComPorts}" 
                  SelectedItem="{Binding Path=ComPort, Mode=TwoWay}" />

        <Label Grid.Row="1" Grid.Column="0" Target="{Binding ElementName=BaudRate}">Baud Rate</Label>
        <ComboBox Grid.Row="1" Grid.Column="1" x:Name="BaudRate" 
                  ItemsSource="{Binding Path=BaudRates}"
                  SelectedItem="{Binding Path=BaudRate, Mode=TwoWay}" />
    </Grid>
</UserControl>
